package com.elite.groovy.callback

import com.elite.groovy.util.EliteBean
import org.apache.commons.logging.Log
import org.apache.commons.logging.LogFactory

import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse
import java.text.SimpleDateFormat
/*
 * 配送清单报表汇总
 * 
 */

public class JobReportTabcps implements ServiceBackInvoke{
	private static final Log log =LogFactory.getLog(JobReportTabcps.class);
	public String doCallBack(EliteBean eliteBean, HttpServletRequest request, HttpServletResponse response) {
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String useTimeInfo = "";
		Long useStartTime = System.currentTimeMillis();
		
		log.debug("配送清单报表汇总定时任务执行开始:" + df.format(new Date()));
		def param=new String[0];
		def procedure="{call sp_rpt_tabcps(?)}";
		def result=eliteBean.executeWithReturn(procedure,param,"dataSource");
		
		Long useEndTime = System.currentTimeMillis();
		useTimeInfo = Long.toString(useEndTime - useStartTime);
		
		log.debug("配送清单报表汇总定时任务处理时长(毫秒):" + useTimeInfo + " EndTime:" + df.format(new Date()));
	}
}